/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package settingsManager;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;

/**
 *
 * @author rbs
 */
public class SettingsCollection {

    private Properties properties;

    String filename;
    ArrayList<Setting> settings;


    public SettingsCollection(String filename) throws IOException {
        this.filename = filename;
        LoadFromXML();
    }

    public Properties getProperties()
    {
        return properties;
    }

    public void setProperties(Properties properties)
    {
        properties = this.properties;
    }

    public String getProperty(String name)
    {
        return properties.getProperty(name);
    }

    public String getProperty(String name, String standard)
    {
        return properties.getProperty(name, standard);
    }

    public void SaveProperties() throws IOException
    {
        properties.store(new FileOutputStream(filename), null);
    }

    public void addSetting(Setting setting)
    {
        settings.add(setting);
    }

    private void LoadFromXML() {
        
    }

}
